

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<script type="text/javascript" src="helpman_topicinit.js"></script>

<title>Data Modeling [Enterprise Architect User Guide]</title>

<meta name="keywords" content="Enterprise Architect, Sparx Systems, UML, Data Modeling,Data Modeling Introduction,Data Modeling Profile (UML),Data Modeling Typical Tasks,Table,Table DDL Script For,DDL,DDL Scripts And Generated Tables,Database,Database Design,Database Modeling,Database Schema, Import Of,Database Supported Types,Database Keys,UML,UML Data Modeling Profile,Model,Model Databases,Keys,Keys Primary, Definition,Keys Foreign, Definition">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />

<link type="text/css" href="default.css" rel="stylesheet" />
<style type="text/css">
  A, A:Visited
  {
    color: #00F;
  }

  A:Active, A:Hover
  {
    color: #F00;
  }

  OL
  {
    margin: 5px 0 5px 48px;
  }

  UL
  {
    margin-bottom: 3px;
    margin-top: 0;
  }

  #nsr
  {
    background-color: #D4DFFF;
  }

  #nsr A
  {
    text-decoration: none;
  }

  #mainbody
  {
    padding: 8px;
  }

  .p_BodyText
  {
    padding: 5px 0;
  }
</style>



<style type="text/css" media="screen">
  BODY
  {
    background-color: #FFFFFF;
  }

  #nsr
  {
    padding: 6px 6px 0 6px;
    border-bottom: none;
    vertical-align: top;
    z-index: 2;
    visibility: visible;
    left: 0;
    top: 0;
    position: absolute;
  }

  #mainbody
  {
    left: 0;
    top: 0;
    margin: 0;
    position: absolute;
    padding: 10px;
    overflow: auto;
    height: 100%;
    z-index: 1;
    background-repeat: no-repeat;
    background-position: bottom right;
    background-attachment: fixed;
  }
</style>

<style type="text/css" media="print">
  #nsr
  {
    visibility: none;
  }

  #mainbody
  {
    overflow: visible;
  }
</style>
<script type="text/javascript" language="JavaScript" src="nonscroll.js"></script>

</head>
<body scroll="no">

<div id="page">



        <div id="content">
          <div id="content-inner">
          



  
          <div id="nsr">
            <table border="0" cellspacing="0" cellpadding="4" width="100%">
              <tr valign="top">
                <td align="left">
  


                  <p class="p_Heading1"><span class="f_Heading1">Data Modeling</span></p>



  
                </td>
                <td align="right">
                  <a href="introduction.htm" onmouseover="document.images.main.src='button_main_h.gif'" onmouseout="document.images.main.src='button_main.gif'">
                    <img name="main" src="button_main.gif" border=0 alt="Return to Introduction">
                  </a>&nbsp;
    
                  <a href="import_wsdl.htm" onmouseover="document.images.prev.src='button_prev_h.gif'" onmouseout="document.images.prev.src='button_prev.gif'">
                    <img name=prev src="button_prev.gif" border=0 alt="Previous page" />
                  </a>&nbsp;
    
    
    
                  <a href="adatamodeldiagram.htm" onmouseover="document.images.next.src='button_next_h.gif'" onmouseout="document.images.next.src='button_next.gif'">
                    <img name=next src="button_next.gif" border=0 alt="Next page" />
                  </a>
    
    
                </td>
              </tr>
            </table>
          </div>
          <div id="mainbody">
  


                <p class="p_TextIndentedL1"><img src="data_modeling.png" width="334" height="100" border="0" alt="data_modeling"></p>
<p class="p_BodyText"><span class="f_BodyText">You perform database modeling and database design in Enterprise Architect using the </span><span class="f_BodyText" style="font-style: italic;">UML Data Modeling Profile</span><span class="f_BodyText">. This profile provides easy-to-use and easy-to-understand extensions to the UML standard, mapping the database concepts of tables and relationships onto the UML concepts of Classes and associations. These extensions also enable you to model database keys, triggers, constraints, RI and other relational database features.</span></p>
<p class="p_BodyText"><span class="f_BodyText">Typical data modeling tasks you might perform are listed at the end of this topic.</span></p>
<p class="p_SubHeadingL1"><span class="f_SubHeadingL1">Tables and Columns</span></p>
<p class="p_BodyText"><span class="f_BodyText">The basic modeling </span><span class="f_BodyText" style="font-style: italic;">structure</span><span class="f_BodyText"> of a relational database is the </span><span class="f_BodyText" style="font-style: italic;">table</span><span class="f_BodyText">, which represents a set of records, or rows, with the same structure. The basic organizational </span><span class="f_BodyText" style="font-style: italic;">element</span><span class="f_BodyText"> of a relational database is the </span><span class="f_BodyText" style="font-style: italic;">column</span><span class="f_BodyText">. Every individual item of data entered into a relational database is represented by a value in a column of a row in a table.</span></p>
<p class="p_BodyText"><span class="f_BodyText">The UML Data Modeling Profile represents:</span></p>
<ul style="text-indent: 0px; margin-left: 30px; list-style-position: outside;">
<li><span class="f_Bulletlist1">Tables as stereotyped </span><span class="f_Bulletlist1" style="font-style: italic;">Classes</span><span class="f_Bulletlist1">; that is, Class elements with a </span><span class="f_Bulletlist1" style="font-style: italic;">stereotype</span><span class="f_Bulletlist1"> of</span><span class="f_Bulletlist1"> </span><span class="f_Bulletlist1" style="font-weight: bold;">table</span></li>
<li><span class="f_Bulletlist1">Columns as stereotyped </span><span class="f_Bulletlist1" style="font-style: italic;">attributes</span><span class="f_Bulletlist1">; that is, attributes with a </span><span class="f_Bulletlist1" style="font-style: italic;">stereotype</span><span class="f_Bulletlist1"> of </span><span class="f_Bulletlist1" style="font-weight: bold;">column</span><span class="f_Bulletlist1">.</span></li>
</ul>
<p class="p_BodyText"><span class="f_BodyText">Enterprise Architect can generate simple DDL scripts to create the tables in your model.</span></p>
<p class="p_SubHeadingL1"><span class="f_SubHeadingL1">Database Keys</span></p>
<p class="p_BodyText"><span class="f_BodyText">Two types of key are used to access tables: </span><span class="f_BodyText" style="font-style: italic;">Primary Keys</span><span class="f_BodyText"> and </span><span class="f_BodyText" style="font-style: italic;">Foreign Keys</span><span class="f_BodyText">. A Primary Key uniquely identifies a record in a table, while a Foreign Key accesses data in some other related table via its Primary Key.</span></p>
<p class="p_BodyText"><span class="f_BodyText">A Primary Key consists of one or more columns; a simple Primary Key (single column) is defined as the attribute of a stereotyped operation. A complex Primary Key (several columns) is defined as the stereotyped operation itself.</span></p>
<p class="p_BodyText"><span class="f_BodyText">A Foreign Key is a collection of columns (attributes) that together have some operational meaning (they enforce a relationship to a Primary Key in another table). Foreign keys are represented in Enterprise Architect as operations with the stereotype</span><span class="f_BodyText" style="font-weight: bold;"> FK</span><span class="f_BodyText">; the operation parameters become the columns involved in the key.</span></p>
<p class="p_SubHeadingL1"><span class="f_SubHeadingL1">Supported Databases</span></p>
<p class="p_BodyText"><span class="f_BodyText">Enterprise Architect supports import of database schema from these databases:</span></p>
<ul style="text-indent: 0px; margin-left: 30px; list-style-position: outside;">
<li><span class="f_Bulletlist1">DB2</span></li>
<li><span class="f_Bulletlist1">Firebird/InterBase</span></li>
<li><span class="f_Bulletlist1">Informix</span></li>
<li><span class="f_Bulletlist1">Ingres</span></li>
</ul>
<ul style="text-indent: 0px; margin-left: 30px; list-style-position: outside;">
<li><span class="f_Bulletlist1">MS Access 97, 2000, 2003</span></li>
<li><span class="f_Bulletlist1">Access 2007</span></li>
<li><span class="f_Bulletlist1">MS SQL Server</span></li>
<li><span class="f_Bulletlist1">MySQL</span></li>
<li><span class="f_Bulletlist1">Oracle 9i, 10g and 11g</span></li>
<li><span class="f_Bulletlist1">PostgreSQL</span></li>
<li><span class="f_Bulletlist1">Sybase Adaptive Server Anywhere (Sybase ASA)</span></li>
<li><span class="f_Bulletlist1">Sybase Adaptive Server Enterprise (Sybase ASE).</span></li>
</ul>
<div style="text-align: left; text-indent: 0px; padding: 0px 0px 0px 0px; margin: 5px 0px 5px 13px;"><table cellspacing="0" cellpadding="2" border="0" style="border: none; border-spacing:0px;">
<tr style="text-align:left;vertical-align:bottom;">
<td valign="bottom" width="952" bgcolor="#efeff7" style="width:952px; background-color:#efeff7;"><p class="p_TiporNote" style="border-top: none; border-right: none; border-left: none;"><span class="f_TiporNote">Note:</span></p>
</td>
</tr>
<tr style="text-align:left;">
<td width="952" bgcolor="#f7f7ff" style="width:952px; background-color:#f7f7ff;"><p class="p_TiporNoteText"><span class="f_TiporNoteText">Firebird 1.5 database tables can be modeled and generated as InterBase tables. Firebird tables can be imported but are treated as InterBase tables.</span></p>
</td>
</tr>
</table>
</div>
<p class="p_SubHeadingL1"><span class="f_SubHeadingL1">Typical Tasks</span></p>
<p class="p_BodyText"><span class="f_BodyText">Typical tasks you can perform when modeling or designing databases include:</span></p>
<ul style="text-indent: 0px; margin-left: 30px; list-style-position: outside;">
<li><span class="f_Bulletlist1"><a href="adatamodeldiagram.htm">Create a Data Model Diagram</a></span></li>
<li><span class="f_Bulletlist1"><a href="createatable.htm">Create a Table</a></span></li>
<li><span class="f_Bulletlist1"><a href="o411.htm">Set Properties of a Table</a></span></li>
<li><span class="f_Bulletlist1"><a href="createcolumns.htm">Create Columns</a></span></li>
<li><span class="f_Bulletlist1"><a href="create_oracle_packages.htm">Create Oracle Packages</a></span></li>
<li><span class="f_Bulletlist1"><a href="primarykey.htm">Create Primary Keys</a></span></li>
<li><span class="f_Bulletlist1"><a href="foreignkeys.htm">Create Foreign Keys</a></span></li>
<li><span class="f_Bulletlist1"><a href="storedprocedures.htm">Create Stored Procedures</a></span></li>
<li><span class="f_Bulletlist1"><a href="views.htm">Create Views</a></span></li>
<li><span class="f_Bulletlist1"><a href="indexestriggers.htm">Create Indexes and Triggers</a></span></li>
<li><span class="f_Bulletlist1"><a href="generateddl.htm">Generate DDL for a Table</a></span></li>
<li><span class="f_Bulletlist1"><a href="generateddlforapackage.htm">Generate DDL for a Package</a>, and compare with the database</span></li>
<li><span class="f_Bulletlist1"><a href="dbmsdatatypemapper.htm">Convert Datatypes for a Table</a></span></li>
<li><span class="f_Bulletlist1"><a href="dbmspackagedatabasemapper.htm">Convert Datatypes for a Package</a></span></li>
<li><span class="f_Bulletlist1"><a href="dbmsdatatypes.htm">Customize Datatypes for a DBMS</a></span></li>
<li><span class="f_Bulletlist1"><a href="importdatabaseschemafromod.htm">Import a Database Schema from an ODBC Data Source</a></span></li>
</ul>
<div style="text-align: left; text-indent: 0px; padding: 0px 0px 0px 0px; margin: 5px 0px 5px 13px;"><table cellspacing="0" cellpadding="2" border="0" style="border: none; border-spacing:0px;">
<tr style="text-align:left;vertical-align:bottom;">
<td valign="bottom" width="952" bgcolor="#efeff7" style="width:952px; background-color:#efeff7;"><p class="p_TiporNote" style="border-top: none; border-right: none; border-left: none;"><span class="f_TiporNote">Note:</span></p>
</td>
</tr>
<tr style="text-align:left;">
<td width="952" bgcolor="#f7f7ff" style="width:952px; background-color:#f7f7ff;"><p class="p_TiporNoteText"><span class="f_TiporNoteText">The UML Data Modeling Profile is not currently a ratified standard; however it has wide industry support and is a useful method for bridging the gap between the UML and conventional relational database modeling.</span></p>
</td>
</tr>
</table>
</div>




            </div>
          </div>
        </div>



</div>


</body>
</html>
